/**
 *
 * © Bahadir Zeren 2011
 * bzeren@gmail.com
 * No warranties, express or implied, are made for this program.
 *
 */

package org.baatar.net.message;

import java.io.Serializable;

/**
 * Ancestor interface for the Response message objects.
 * 
 * Response message classes are used to encapsulate the data to be received from 
 * the TCP service which has been connected to.
 * Instances of this serializable class are read from ObjectInputStream and 
 * sent via java.net.Socket.
 * 
 * @author b_zeren
 */
public interface IResponse<T> extends Serializable {

    /**
     * Result value got from TCP service of the processed request.
     * 
     * @return T result value received from TCP service upon request.
     */
    public T getResult();

    /**
     * Exception information.
     * 
     * @return Exception if an exception occcured on the TCP Service.
     */
    public Exception getException();
}
